package com.keray.web.push;

import lombok.*;

import javax.validation.constraints.NotEmpty;

/**
 * @author by keray
 * date:2021/7/26 9:46 上午
 */
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ClientMessageData {
    private String messageId;
    @NotEmpty
    private String service;
    @NotEmpty
    private String targetId;
    @NotEmpty
    private String message;
    // 0 uid | 1 group | 2 service
    private int channel;
    // 消息类型| push 支持离线推送消息 | online 仅在线推送
    private MessageType type;

    private Integer retry = 1;

    private Integer version = 0;

    /**
     * 是否异步发送
     */
    private boolean async = false;

    /**
     * 是否存储消息
     */
    private boolean save = true;
}
